#ifndef SCENE_H
#define SCENE_H

#include <QGraphicsScene>
#include <QList>

class QGraphicsObject;
class Scene : public QGraphicsScene
{
public:
    explicit Scene(QObject *parent = nullptr);

    void setData(const QList<int> &data);

    void swap(int idx1, int idx2);
    void compare(int idx1, int idx2);


private:
    QList<QGraphicsObject *> m_items;
    QList<QGraphicsObject *> m_compareItems;
    bool inAnimation;
    qreal m_circleRectSize;

    QPen m_defaultPen;
    QBrush m_defaultBrush;
    QPen m_comparePen;
    QBrush m_compareBrush;
};

#endif // SCENE_H
